<%--
  Created by IntelliJ IDEA.
  User: LikZ
  Date: 2021.8.31
  Time: 下午 19:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet" />
    <script src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container" style="width: 420px; border: 7px solid red; margin-top: 50px; border-radius: 12px">
    <h3 style="text-align: center;">修改用户信息</h3>
    <form class="form-horizontal" action="${pageContext.request.contextPath}/userupdate" method="post">
        <input type="hidden" name="uid"  value="${user.uid}"/>
        <div class="form-group">
            <label for="username" class="col-sm-2 control-label">昵称</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="username"  value="${user.username}" id="username" >
            </div>
        </div>
        <div class="form-group">
            <label for="password" class="col-sm-2 control-label">密码</label>
            <div class="col-sm-10">
                <input type="password" class="form-control" name="password"  value="${user.password}"  id="password" >
            </div>
        </div>
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="name"  value="${user.name}"  id="name" >
            </div>
        </div>
        <div class="form-group">
            <label for="sex" class="col-sm-2 control-label">性别</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="sex"  value="${user.sex}" id="sex" >
            </div>
        </div>

        <div class="form-group">
            <label for="birthday" class="col-sm-2 control-label">出生日期</label>
            <div class="col-sm-10">
                <input type="date" readonly="readonly" name="birthday" id="birthday" class="form-control"
                       value="<fmt:formatDate value="${user.birthday}"  pattern="yyyy-MM-dd" />"  />
            </div>
        </div>
        <div class="form-group">
            <label for="state" class="col-sm-2 control-label">状态</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="state"  value="${user.state}"   id="state" >
            </div>
        </div>

        <div class="form-group" style="text-align: center">
            <input class="btn btn-success" type="submit" value="保存"  />
            <input class="btn btn-danger" type="reset" value="重置" />
        </div>
    </form>
</div>
</body>
</html>
